using System.ComponentModel.DataAnnotations;
using Universal.Domain.Enums;

namespace Universal.Application.Contracts.Dto.Article;

public class UpdateArticleDto
{
    public Guid Id { get; set; }

    [Required(ErrorMessage = "文章标题不能为空")]
    [StringLength(255, ErrorMessage = "文章标题长度不能超过255个字符")]
    public string Title { get; set; } = string.Empty;

    [StringLength(500, ErrorMessage = "文章摘要长度不能超过500个字符")]
    public string? Summary { get; set; }

    public string? Content { get; set; }

    public ArticleStatus Status { get; set; }

    [StringLength(500, ErrorMessage = "标签长度不能超过500个字符")]
    public string? Tags { get; set; }

    // 支持多个分类ID
    public List<Guid> CategoryIds { get; set; } = new List<Guid>();
    
    // 保持向后兼容
    public Guid? CategoryId { get; set; }
}
